# movtest2.s - using indexed memory locations
.section .data
output:
    .asciz "the value is %d\n"
values:
    .int 10, 15, 20, 25, 30
.section .text
.globl _start
_start:
    nop
    movl $0, %edi
loop:
    movl values(, %edi, 4), %eax
    pushl %eax
    pushl $output
    call printf
    addl $8, %esp
    inc %edi
    cmpl $5, %edi
    jne loop
    movl $0, %ebx
    movl $1, %eax
    int $0x80
